package cn.niitcxl.services.impl;

import cn.niitcxl.domain.adminUser;
import cn.niitcxl.mapper.LoginMapper;
import cn.niitcxl.services.LoginServices;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class LoginServicesImpl implements LoginServices {

    @Autowired
    private LoginMapper loginMapper;
    @Override
    public adminUser login(String username, String password) {
        QueryWrapper queryWrapper = new QueryWrapper();
        queryWrapper.eq("user_name",username);
        queryWrapper.eq("pass_word",password);
        adminUser adminUser = loginMapper.selectOne(queryWrapper);
        return adminUser;
    }
}